#ifndef CENTERWIDGET_H
#define CENTERWIDGET_H

#include <QWidget>
#include <QTimer>
#include <QFile>
#include <QDebug>
#include <QEvent>
#include <QKeyEvent>
#include <QSettings>
#include "settingmanage.h"
#include "sqlitemanage.h"

namespace Ui {
class CenterWidget;
}

class CenterWidget : public QWidget
{
    Q_OBJECT

public:
    explicit CenterWidget(QWidget *parent = nullptr);
    ~CenterWidget();
    void loadStyleSheet(const QString &CssPath);

public slots:
    void onLogin();
signals:
    void sendMessage(QString s);
    void selectStackWidget(int);
protected:
    void keyPressEvent(QKeyEvent *event) override;
private:
    Ui::CenterWidget *ui;
    QTimer *m_pTimer;
    QString UserName;
    QString PassWord;
    SqliteManage sqlOperator;
    SettingManage *m_pSettingManage;
};

#endif // CENTERWIDGET_H
